package cate.game.role.note.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBRole;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "主角笔记本写入の请求")
public class NoteWriteReq implements MsgInput {
    @NoteField(value = "键")
    public String key;

    @NoteField(value = "值")
    public Object value;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        cc.getRole().getNote().write(key,value);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBRole.NOTE_WRITE_REQ;
    }
}
